package com.jhcee.jhgk.inform.scheduled;

import com.jhcee.jhgk.inform.utils.WechatUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @Description:
 * @Author: lemon_xzp
 * @Date: 2021/8/29 13:25
 */
@Configuration
@EnableScheduling
@Slf4j
public class WechatScheduled {

    @Scheduled(cron = "0 0 0/2 * * ? *")
    private void updateToken() {
        log.info("刷新微信access token >>> {}",System.currentTimeMillis());
        WechatUtil.updateToken();
    }
}
